package bam.action.system;

import java.util.Map;

import com.opensymphony.xwork2.ActionContext;

import bam.entityBam.Zzroleuser;
import bam.service.AppSystemService;
import bam.util.PagingUtil;

public class RoleAction {
		private  AppSystemService appSystemService;

		public Zzroleuser zzroleuser;
		private int pageNo;
		private  int logCount;
		private int pageCount;
		
		
		public String  roleUser(){
			PagingUtil<Zzroleuser> pu=new PagingUtil<Zzroleuser>();
			if(pageNo!=0){
				pu.setPageNo(pageNo);
				pu.setLogCount(logCount);
				pu.setPageCount(pageCount);
			}
			
			try {
				appSystemService.selectSystemUser(pu, zzroleuser);
				for (int i = 0; i < pu.getList().size(); i++) {
					System.out.println(pu.getList().get(i).getPhone());
				}
				Map<String, Object> request = ActionContext.getContext().getContextMap();
				request.put("page", pu);
			} catch (Exception e) {
				e.printStackTrace();
			}
			
			
			return "roleUser";
		}
		
		
		
		public void setAppSystemService(AppSystemService appSystemService) {
			this.appSystemService = appSystemService;
		}

		public Zzroleuser getZzroleuser() {
			return zzroleuser;
		}

		public void setZzroleuser(Zzroleuser zzroleuser) {
			this.zzroleuser = zzroleuser;
		}



		public int getPageNo() {
			return pageNo;
		}



		public void setPageNo(int pageNo) {
			this.pageNo = pageNo;
		}



		public int getLogCount() {
			return logCount;
		}



		public void setLogCount(int logCount) {
			this.logCount = logCount;
		}



		public int getPageCount() {
			return pageCount;
		}



		public void setPageCount(int pageCount) {
			this.pageCount = pageCount;
		}
		
		
		
		
}
